<template>
	<view class='form'>
		<uni-row class="demo-uni-row">
			<view class="headIcon">
				<image :src="head_ico"></image>
			</view>
		</uni-row>
		<uni-row class="demo-uni-row">
			<view class="demo-uni-col dark">账号：</view>
			<view class="demo-uni-col light ">{{username}}</view>
		</uni-row>
		<uni-row class="demo-uni-row">
			<view class="demo-uni-col dark">姓名:</view>
			 <view class="demo-uni-col light">{{nickname}}</view>
		</uni-row>
		<uni-row class="demo-uni-row">
			 <view class="demo-uni-col dark">单位：</view>
			  <view class="demo-uni-col light">{{company}}</view>
		</uni-row>
		<uni-row class="demo-uni-row">
			<view class="demo-uni-col dark">手机号：</view>
			 <view class="demo-uni-col light">{{tel}}</view>
		</uni-row>
		<uni-row class="demo-uni-row">
			 <view class="demo-uni-col dark">部门：</view>
			  <view class="demo-uni-col light">{{deptName}}</view>
		</uni-row>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				username:'',
				nickname:'',
				company:'',
				tel:'',
				deptName:'',
				head_ico:''
			}
		},
		methods: {
			init(){
				const user = uni.getStorageSync("user");
				this.username=user.username
				this.nickname = user.nickname;
				this.company=user.company
				this.tel = user.tel;
				this.deptName=user.deptName||'无'
				this.head_ico=user.head_ico
			}
		},
		onReady(){
			uni.setNavigationBarTitle({
			    title: '用户信息'
			});
		},
		onShow(){
			this.init()
		}
	}
</script>

<style scoped>
	.form{
		padding:10px;
	}
	.demo-uni-row{
		
		/* border-bottom:1px solid #c8c7cc; */
	}
	uni-view{
		line-height: 36px;
		font-size: 14px;
		color: #333;
	}
	.border{
		border:1px solid #c8c7cc;
		border-radius: 4px;
		height: 36px;
		padding-left: 10px!important;
	}
	.uni-row{
		display: flex;
		justify-content: space-between;
		border-bottom: 1px solid #e9e9e9;
		padding:6px 6px;
	}
	.uni-row:first-child{
		border: 0;
		margin: auto;
		justify-content: center;
		margin-bottom: 40px;
	}
	.uni-row::before, .uni-row::after{
		display: unset;
		content: unset;
	}
	.headIcon{
		width: 70px;
		height: 70px;
		/* background-color: #000000; */
	}
	.headIcon>image{
		width: 100%;
		height: 100%;
		border-radius: 50%;
	}
</style>
